package com.marvels.financial.loan.api.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.marvels.financial.loan.api.FiancialLoanAuditApi;
import com.marvels.financial.loan.dao.McfeLendingProcessLogDao;
import com.marvels.financial.loan.dao.McfeLendingProcessDao;
import com.marvels.financial.loan.dto.McfeLendingProcess;
import com.marvels.financial.loan.dto.McfeLendingProcessLog;


@Service
public class FiancialLoanAuditImpl implements FiancialLoanAuditApi{

	@Autowired
	private McfeLendingProcessLogDao mcfeLendingProcessLogMapper;
	
	@Autowired
	private McfeLendingProcessDao mcfeLendingProcessMapper;
	
	
	@Override
	public int insertLoanAuditInfo(McfeLendingProcess mcfeLendingProcess) {
		return mcfeLendingProcessMapper.insertSelective(mcfeLendingProcess);
	}

	@Override
	public int updateLoanAuditInfo(McfeLendingProcess mcfeLendingProcess) {
		return mcfeLendingProcessMapper.updateByPrimaryKeySelective(mcfeLendingProcess);
	}

	@Override
	public McfeLendingProcess selectByloanIdAndStatus(String loanId, String status) {
		return mcfeLendingProcessMapper.selectByloanIdAndStatus(loanId, status);
	}

	@Override
	public int insertLoanAuditLogInfo(McfeLendingProcessLog mcfeLendingProcessLog) {
		return mcfeLendingProcessLogMapper.insertSelective(mcfeLendingProcessLog);
	}

}
